package battleship;

/**
 *
 * @author Code and Psuedocode: Shaun Pickford
 */
public class Ship {

    String shipName;
    int shipLength, hits;
    char shipID;


    public Ship(String name, int length)
    {
        shipName = name;
        shipLength = length;
        hits = 0;
        String tempID = name.substring(0,1).toUpperCase();
        shipID = tempID.charAt(0);
    }

    public int getShipLength()
    {
        return shipLength;
    }

    public void setShipLength(int len)
    {
        shipLength = len;
    }

    public String getShipName()
    {
        return shipName;
    }

    public void setShipName(String name)
    {
        shipName = name;
    }

    public void addHit()
    {
        hits++;
    }

    public int getHits()
    {
        return hits;
    }

    public char getShipID()
    {
        return shipID;
    }
}//class
